﻿<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>我的积分 - 模切材料小管家</title>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <style>
        :root {
            /* TDesign 工业品色彩系统 */
            --primary-color: #0052d9;
            --primary-light: #266fe8;
            --primary-dark: #003cab;
            --secondary-color: #f2f3ff;
            --accent-color: #e37318;
            --success-color: #00a870;
            --warning-color: #ed7b2f;
            --error-color: #d54941;
            
            /* 背景色系 */
            --bg-color-page: #f5f7fa;
            --bg-color-container: #ffffff;
            --bg-color-secondray: #f8f9fc;
            
            /* 边框和分割线 */
            --border-color: #e7e7e7;
            --border-color-light: #f0f0f0;
            --border-radius-small: 3px;
            --border-radius-medium: 6px;
            --border-radius-large: 9px;
            
            /* 文字色彩 */
            --text-primary: #1a1a1a;
            --text-secondary: #4e5969;
            --text-placeholder: #86909c;
            --text-disabled: #c9cdd4;
            
            /* 阴影系统 */
            --shadow-1: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
            --shadow-2: 0 1px 4px 0 rgba(0, 0, 0, 0.08);
            --shadow-3: 0 4px 8px 0 rgba(0, 0, 0, 0.12);
            
            /* 间距系统 */
            --space-1: 4px;
            --space-2: 8px;
            --space-3: 12px;
            --space-4: 16px;
            --space-5: 20px;
            --space-6: 24px;
            --space-8: 32px;
            --space-10: 40px;
        }
        
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: "PingFang SC", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
        }
        
        body {
            background-color: var(--bg-color-page);
            color: var(--text-primary);
            font-size: 14px;
            line-height: 1.5;
            padding-bottom: 64px;
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
        }
        
        .container {
            max-width: 480px;
            margin: 0 auto;
            background: var(--bg-color-container);
            min-height: 100vh;
            box-shadow: var(--shadow-1);
            position: relative;
            overflow-x: hidden;
        }
        
        /* 头部样式 */
        .header {
            background: var(--primary-color);
            color: white;
            padding: var(--space-4);
            position: relative;
            z-index: 10;
        }
        
        .top-bar {
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        
        .back-btn {
            font-size: 18px;
            cursor: pointer;
            opacity: 0.9;
            transition: opacity 0.2s ease;
        }
        
        .back-btn:hover {
            opacity: 1;
        }
        
        .page-title {
            font-weight: 500;
            font-size: 16px;
        }
        
        .actions {
            display: flex;
            gap: var(--space-4);
        }
        
        .actions i {
            font-size: 16px;
            cursor: pointer;
            opacity: 0.9;
            transition: opacity 0.2s ease;
        }
        
        .actions i:hover {
            opacity: 1;
        }
        
        /* 积分总览卡片 */
        .points-overview {
            background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
            color: white;
            padding: var(--space-6);
            margin: var(--space-4);
            border-radius: var(--border-radius-large);
            box-shadow: var(--shadow-2);
            text-align: center;
        }
        
        .points-info {
            margin-bottom: var(--space-4);
        }
        
        .points-label {
            font-size: 14px;
            opacity: 0.9;
            margin-bottom: var(--space-2);
        }
        
        .points-amount {
            font-size: 48px;
            font-weight: 700;
            margin-bottom: var(--space-2);
        }
        
        .member-level {
            display: inline-block;
            background: rgba(255, 255, 255, 0.2);
            padding: var(--space-2) var(--space-4);
            border-radius: var(--border-radius-large);
            font-size: 14px;
            font-weight: 600;
            margin-bottom: var(--space-4);
        }
        
        .level-progress {
            background: rgba(255, 255, 255, 0.2);
            border-radius: var(--border-radius-large);
            padding: var(--space-3);
            margin-bottom: var(--space-4);
        }
        
        .progress-info {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: var(--space-2);
            font-size: 12px;
        }
        
        .progress-bar {
            background: rgba(255, 255, 255, 0.3);
            border-radius: var(--border-radius-small);
            height: 6px;
            overflow: hidden;
        }
        
        .progress-fill {
            background: white;
            height: 100%;
            border-radius: var(--border-radius-small);
            transition: width 0.3s ease;
        }
        
        .quick-actions {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: var(--space-3);
        }
        
        .action-btn {
            background: rgba(255, 255, 255, 0.15);
            border: 1px solid rgba(255, 255, 255, 0.3);
            color: white;
            padding: var(--space-3);
            border-radius: var(--border-radius-medium);
            font-size: 13px;
            cursor: pointer;
            transition: all 0.2s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: var(--space-2);
        }
        
        .action-btn:hover {
            background: rgba(255, 255, 255, 0.25);
            transform: translateY(-1px);
        }
        
        /* 会员专享提示 */
        .vip-tip {
            background: var(--bg-color-container);
            margin: var(--space-4);
            border-radius: var(--border-radius-medium);
            padding: var(--space-4);
            box-shadow: var(--shadow-1);
            border: 1px solid var(--border-color-light);
            border-left: 4px solid var(--accent-color);
        }
        
        .vip-header {
            display: flex;
            align-items: center;
            margin-bottom: var(--space-2);
        }
        
        .vip-icon {
            color: var(--accent-color);
            margin-right: var(--space-2);
            font-size: 16px;
        }
        
        .vip-title {
            font-size: 15px;
            font-weight: 600;
            color: var(--text-primary);
        }
        
        .vip-desc {
            font-size: 13px;
            color: var(--text-secondary);
            line-height: 1.5;
            margin-bottom: var(--space-3);
        }
        
        .vip-btn {
            background: var(--accent-color);
            color: white;
            padding: var(--space-2) var(--space-4);
            border: none;
            border-radius: var(--border-radius-medium);
            font-size: 13px;
            cursor: pointer;
            transition: all 0.2s ease;
        }
        
        .vip-btn:hover {
            background: #c96315;
        }
        
        /* 积分规则说明样式 */
        .points-rules-section {
            background: var(--bg-color-container);
            margin: var(--space-4);
            border-radius: var(--border-radius-medium);
            padding: var(--space-4);
            box-shadow: var(--shadow-1);
            border: 1px solid var(--border-color-light);
        }
        
        .rules-content {
            margin-top: var(--space-4);
        }
        
        .rule-category {
            margin-bottom: var(--space-6);
        }
        
        .rule-category-title {
            font-size: 16px;
            font-weight: 600;
            color: var(--primary-color);
            margin-bottom: var(--space-4);
            padding-bottom: var(--space-2);
            border-bottom: 2px solid var(--border-color-light);
        }
        
        .rule-detail {
            display: flex;
            gap: var(--space-2);
            margin-bottom: var(--space-4);
            padding: var(--space-3);
            background: var(--bg-color-secondray);
            border-radius: var(--border-radius-medium);
            border-left: 3px solid var(--primary-color);
        }
        
        .rule-number {
            font-weight: 600;
            color: var(--primary-color);
            font-size: 14px;
            flex-shrink: 0;
        }
        
        .rule-content {
            flex: 1;
        }
        
        .rule-name {
            font-weight: 600;
            color: var(--text-primary);
            font-size: 14px;
            margin-bottom: var(--space-1);
        }
        
        .rule-description {
            color: var(--text-secondary);
            font-size: 13px;
            line-height: 1.5;
        }
        
        /* 快速获取积分 */
        .quick-earn {
            background: var(--bg-color-container);
            margin: var(--space-4);
            border-radius: var(--border-radius-medium);
            padding: var(--space-4);
            box-shadow: var(--shadow-1);
            border: 1px solid var(--border-color-light);
        }
        
        .section-title {
            font-size: 16px;
            font-weight: 600;
            color: var(--text-primary);
            margin-bottom: var(--space-4);
            display: flex;
            align-items: center;
        }
        
        .section-title i {
            margin-right: var(--space-2);
            color: var(--primary-color);
        }
        
        .earn-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: var(--space-3);
        }
        
        .earn-item {
            background: var(--bg-color-secondray);
            border-radius: var(--border-radius-medium);
            padding: var(--space-3);
            text-align: center;
            cursor: pointer;
            transition: all 0.2s ease;
            border: 1px solid var(--border-color-light);
        }
        
        .earn-item:hover {
            border-color: var(--primary-color);
            box-shadow: var(--shadow-2);
        }
        
        .earn-icon {
            width: 36px;
            height: 36px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 0 auto var(--space-2);
            font-size: 16px;
            color: white;
        }
        
        .earn-icon.checkin {
            background: var(--success-color);
        }
        
        .earn-icon.upload {
            background: var(--primary-color);
        }
        
        .earn-icon.invite {
            background: var(--accent-color);
        }
        
        .earn-icon.verify {
            background: var(--warning-color);
        }
        
        .earn-title {
            font-size: 13px;
            font-weight: 500;
            color: var(--text-primary);
            margin-bottom: var(--space-1);
        }
        
        .earn-points {
            font-size: 12px;
            color: var(--primary-color);
            font-weight: 600;
        }
        
        
        /* 底部导航 */
        .tabbar {
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            background: var(--bg-color-container);
            display: flex;
            border-top: 1px solid var(--border-color);
            z-index: 100;
            max-width: 480px;
            margin: 0 auto;
            height: 64px;
        }
        
        .tab-item {
            flex: 1;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: var(--space-2) 0;
            color: var(--text-placeholder);
            font-size: 10px;
            cursor: pointer;
            transition: color 0.2s ease;
        }
        
        .tab-item.active {
            color: var(--primary-color);
        }
        
        .tab-item:hover {
            color: var(--primary-light);
        }
        
        .tab-item i {
            font-size: 18px;
            margin-bottom: var(--space-1);
        }
    </style>
</head>
<body>
    <div class="container">
        <!-- 头部区域 -->
        <div class="header">
            <div class="top-bar">
                <div class="back-btn" onclick="history.back()">
                    <i class="fas fa-arrow-left"></i>
                </div>
                <div class="page-title">我的积分</div>
                <div class="actions">
                    <i class="fas fa-question-circle" onclick="location.href='points-rules.html'"></i>
                </div>
            </div>
        </div>
        
        <!-- 积分总览 -->
        <div class="points-overview">
            <div class="points-info">
                <div class="points-label">累计积分</div>
                <div class="points-amount" id="totalPoints">8,250</div>
                <div class="member-level" id="memberLevel">黄金会员</div>
            </div>
            
            <!-- 升级进度 -->
            <div class="level-progress">
                <div class="progress-info">
                    <span>距离白金会员</span>
                    <span id="progressText">8250/20000</span>
                </div>
                <div class="progress-bar">
                    <div class="progress-fill" id="progressFill" style="width: 41.25%"></div>
                </div>
            </div>
            
            <div class="quick-actions">
                <button class="action-btn" onclick="location.href='prizes.html'">
                    <i class="fas fa-gift"></i>
                    积分商城
                </button>
                <button class="action-btn" onclick="location.href='points-rules.html'">
                    <i class="fas fa-info-circle"></i>
                    积分规则
                </button>
            </div>
        </div>
        
        <!-- 付费会员专享 -->
        <div class="vip-tip">
            <div class="vip-header">
                <i class="fas fa-crown vip-icon"></i>
                <div class="vip-title">升级付费会员，享1.5倍积分</div>
            </div>
            <div class="vip-desc">注册365元/年的付费会员，享发布权限，享1.5倍积分(仅限付费手机号)</div>
            <button class="vip-btn" onclick="upgradeMember()">
                立即升级
            </button>
        </div>
        
        <!-- 快速获取积分 -->
        <div class="quick-earn">
            <div class="section-title">
                <i class="fas fa-zap"></i>
                快速获取积分
            </div>
            <div class="earn-grid">
                <div class="earn-item" onclick="dailyCheckin()">
                    <div class="earn-icon checkin">
                        <i class="fas fa-calendar-check"></i>
                    </div>
                    <div class="earn-title">每日签到</div>
                    <div class="earn-points">+10积分</div>
                </div>
                <div class="earn-item" onclick="uploadProduct()">
                    <div class="earn-icon upload">
                        <i class="fas fa-upload"></i>
                    </div>
                    <div class="earn-title">产品信息上传</div>
                    <div class="earn-points">+50积分/条</div>
                </div>
                <div class="earn-item" onclick="inviteFriend()">
                    <div class="earn-icon invite">
                        <i class="fas fa-user-plus"></i>
                    </div>
                    <div class="earn-title">推荐有礼</div>
                    <div class="earn-points">+100积分/人</div>
                </div>
                <div class="earn-item" onclick="completeVerify()">
                    <div class="earn-icon verify">
                        <i class="fas fa-shield-alt"></i>
                    </div>
                    <div class="earn-title">身份认证</div>
                    <div class="earn-points">+50/500积分</div>
                </div>
            </div>
        </div>
        
        <!-- 会员积分说明 -->
        <div class="points-rules-section">
            <div class="section-title">
                <i class="fas fa-info-circle"></i>
                会员积分说明
            </div>
            
            <!-- 积分获取途径详细说明 -->
            <div class="rules-content">
                <div class="rule-category">
                    <div class="rule-category-title">积分获取途径</div>
                    
                    <div class="rule-detail">
                        <div class="rule-number">一、</div>
                        <div class="rule-content">
                            <div class="rule-name">推荐有礼</div>
                            <div class="rule-description">成功推荐1人注册并完成小程序个人或企业认证，推荐人可获得100积分/人。</div>
                        </div>
                    </div>
                    
                    <div class="rule-detail">
                        <div class="rule-number">二、</div>
                        <div class="rule-content">
                            <div class="rule-name">身份认证</div>
                            <div class="rule-description">完成小程序个人认证，可获得50积分，每个手机号限1次。<br>完成小程序企业认证，可获得500积分，每个手机号限1次。</div>
                        </div>
                    </div>
                    
                    <div class="rule-detail">
                        <div class="rule-number">三、</div>
                        <div class="rule-content">
                            <div class="rule-name">每日签到</div>
                            <div class="rule-description">每日登录小程序完成签到，可获得10积分/次，每日限1次。</div>
                        </div>
                    </div>
                    
                    <div class="rule-detail">
                        <div class="rule-number">四、</div>
                        <div class="rule-content">
                            <div class="rule-name">产品信息上传</div>
                            <div class="rule-description">在发布入口上传1条信息，可获得50积分/条，上传数量不限。</div>
                        </div>
                    </div>
                    
                    <div class="rule-detail">
                        <div class="rule-number">五、</div>
                        <div class="rule-content">
                            <div class="rule-name">注册成为付费会员</div>
                            <div class="rule-description">注册365元/年的付费会员，享发布权限，享1.5倍积分(仅限付费手机号)</div>
                        </div>
                    </div>
                </div>
                
                <div class="rule-category">
                    <div class="rule-category-title">会员权益与积分使用</div>
                    
                    <div class="rule-detail">
                        <div class="rule-number">一、</div>
                        <div class="rule-content">
                            <div class="rule-name">注册普通会员和付费会员</div>
                            <div class="rule-description">
                                注册普通会员，享有阅读权限；<br>
                                注册付费会员，享有阅读权限、发布权限，能够选择定制服务。<br>
                                <strong>定制服务包括但不限于：</strong><br>
                                1、拼团、组团团购；<br>
                                2、组织工艺设计、生产技术交流指导；<br>
                                3、法律、财务规划指导；<br>
                                4、客户对接；<br>
                                5、公司转让、并购对接。
                            </div>
                        </div>
                    </div>
                    
                    <div class="rule-detail">
                        <div class="rule-number">二、</div>
                        <div class="rule-content">
                            <div class="rule-name">积分商城兑换</div>
                            <div class="rule-description">
                                会员可在积分商城使用累计积分兑换商品或服务，兑换品类包括但不限于：<br>
                                办公用品<br>
                                健康食品<br>
                                培训活动<br>
                                团建活动
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        
        
        <!-- 底部导航 -->
        <div class="tabbar">
            <div class="tab-item" onclick="location.href='home.html'">
                <i class="fas fa-home"></i>
                <span>首页</span>
            </div>
            <div class="tab-item" onclick="location.href='demand-list.html'">
                <i class="fas fa-search"></i>
                <span>求购</span>
            </div>
            <div class="tab-item" onclick="location.href='publish-select.html'">
                <i class="fas fa-plus-circle"></i>
                <span>发布</span>
            </div>
            <div class="tab-item" onclick="location.href='consultation.html'">
                <i class="fas fa-comments"></i>
                <span>客服</span>
            </div>
            <div class="tab-item active" onclick="location.href='profile.html'">
                <i class="fas fa-user"></i>
                <span>我的</span>
            </div>
        </div>
    </div>
    
    <script>
        // 模拟用户数据
        const userData = {
            totalPoints: 8250,
            memberLevel: '黄金会员',
            isVip: false
        };
        
        // 会员等级配置
        const memberLevels = [
            { name: '青铜会员', min: 50, max: 4999 },
            { name: '白银会员', min: 5000, max: 9999 },
            { name: '黄金会员', min: 10000, max: 19999 },
            { name: '白金会员', min: 20000, max: 29999 },
            { name: '钻石会员', min: 30000, max: 39999 },
            { name: '黑钻会员', min: 40000, max: Infinity }
        ];
        
        // 初始化页面数据
        function initPageData() {
            const totalPoints = userData.totalPoints;
            const currentLevel = getCurrentLevel(totalPoints);
            const nextLevel = getNextLevel(totalPoints);
            
            document.getElementById('totalPoints').textContent = totalPoints.toLocaleString();
            document.getElementById('memberLevel').textContent = currentLevel.name;
            
            if (nextLevel) {
                const progress = ((totalPoints - currentLevel.min) / (nextLevel.min - currentLevel.min)) * 100;
                document.getElementById('progressFill').style.width = progress + '%';
                document.getElementById('progressText').textContent = `${totalPoints}/${nextLevel.min}`;
            } else {
                document.getElementById('progressText').textContent = '已达最高等级';
                document.getElementById('progressFill').style.width = '100%';
            }
        }
        
        // 获取当前等级
        function getCurrentLevel(points) {
            for (let level of memberLevels) {
                if (points >= level.min && points <= level.max) {
                    return level;
                }
            }
            return memberLevels[0];
        }
        
        // 获取下一等级
        function getNextLevel(points) {
            for (let i = 0; i < memberLevels.length - 1; i++) {
                if (points >= memberLevels[i].min && points <= memberLevels[i].max) {
                    return memberLevels[i + 1];
                }
            }
            return null;
        }
        
        // 每日签到
        function dailyCheckin() {
            alert('签到成功！获得10积分');
        }
        
        // 上传产品
        function uploadProduct() {
            location.href = 'publish-select.html';
        }
        
        // 邀请好友
        function inviteFriend() {
            alert('分享链接给好友注册即可获得积分');
        }
        
        // 完成认证
        function completeVerify() {
            location.href = 'create-enterprise.html';
        }
        
        // 升级会员
        function upgradeMember() {
            alert('正在跳转到会员升级页面...');
        }
        
        
        // 页面加载完成后初始化
        document.addEventListener('DOMContentLoaded', function() {
            initPageData();
        });
    </script>
</body>
</html>